﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; 
using System.Data.Linq.Mapping;

namespace Runda.CMS.Order.Entity
{
    [Table(Name = "Out_Orders")]
    public class CustomerOrder
    {        
        [Column(Name = "cOrderId", DbType = "VarChar(40)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String orderId { get; set; }

        [Column(Name = "cDate", DbType = "VarChar(10)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String date { get; set; }

        [Column(Name = "cNewTime", DbType = "VarChar(16)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String newTime { get; set; }

        [Column(Name = "cCusCode", DbType = "VarChar(50) NOT NULL", CanBeNull = false, UpdateCheck = UpdateCheck.Never)]
        public String customerId { get; set; }

        [Column(Name = "cInvCode", DbType = "VarChar(50) NOT NULL", CanBeNull = false, UpdateCheck = UpdateCheck.Never)]
        public String inventoryBatchCode { get; set; }

        [Column(Name = "iQuantity", DbType = "decimal(20,4)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public decimal quantity { get; set; }

        [Column(Name = "bClose", DbType = "int", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public int bClose { get; set; }

        [Column(Name = "cMemo", DbType = "varchar(200)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String memo { get; set; }

        [Column(Name = "cBill", DbType = "varchar(50)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String bill { get; set; }
      
        [Column(Name = "DataSource", DbType = "int", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public int datasource { get; set; }

        [Column(Name = "cInvM_Unit", DbType = "varchar(50)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String invUnit { get; set; }

        [Column(Name = "cInvName", DbType = "varchar(200)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String invName { get; set; }

        [Column(Name = "cInvStd", DbType = "varchar(100)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String invStd { get; set; }
        [Column(Name = "cCustomerName", DbType = "varchar(200)", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]
        public String CusName { get; set; }

        public IList<Inventory> inventorys { get; set; }

        public List<ShippingRequest> shippingRequest; 
    }
}
